package com.dzjcloud.dzj.upms.api.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@ApiModel("用户")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class User extends Model<User>{

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键",name = "id")
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     *  用户账号
     */
    @ApiModelProperty(value = "用户账号",name = "userCode")
    private String userCode;

    /**
     * 用户密码
     */
    @ApiModelProperty(value = "密码",name = "passwrod")
    private String passwrod;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称",name ="userName")
    private String userName;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别1是男 2是女",name = "sex")
    private Integer sex;

    /**
     * 电话号码
     */
    @ApiModelProperty(value = "电话号码",name = "phone")
    private String phone;

    /**
     * 出生日期
     */
    @ApiModelProperty(value = "出生日期",name = "birth")
    private LocalDate birth;

    @ApiModelProperty(value = "创建时间",name = "createTime")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间",name = "updateTime")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;


    /**
     * 头像路径
     */
    @ApiModelProperty(value = "头像路径",name = "hederUrl")
    private String hederUrl;

    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证号码",name = "idCard")
    private String idCard;

    /**
     * 身份证
     */
    @ApiModelProperty(value = "逻辑删除",name = "isDelete")
    @TableLogic
    private Boolean isDelete;

    @ApiModelProperty("是否实名认证")
    private Boolean isRealName;


    @ApiModelProperty(value = "身份证签发地",name = "idCardIssueAt")
    private String idCardIssueAt;

    @ApiModelProperty("身份证有效起始日期")
    private String idCardEffectiveStrat;

    @ApiModelProperty("身份证有效结束日期")
    private String idCardEffectiveEnd;
}
